Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

About Geometric Objects

A geometric object (or a geometry ) is an instance of the TQ3GeometryObject class. The TQ3GeometryObject class is a subclass of the TQ3ShapeObject , which is itself a subclass of the TQ3SharedObject class. As a result, a geometric object is associated with a reference count, which is incremented or decremented whenever you create or dispose of an instance of that type of object.

Currently, QuickDraw 3D provides many types of primitive geometric objects. A geometric object has one of these types:

kQ3GeometryTypeBox
kQ3GeometryTypeCone
kQ3GeometryTypeCylinder
kQ3GeometryTypeDisk
kQ3GeometryTypeEllipse
kQ3GeometryTypeEllipsoid
kQ3GeometryTypeGeneralPolygon
kQ3GeometryTypeLine
kQ3GeometryTypeMarker
kQ3GeometryTypeMesh
kQ3GeometryTypeNURBCurve
kQ3GeometryTypeNURBPatch
kQ3GeometryTypePixmapMarker
kQ3GeometryTypePoint
kQ3GeometryTypePolygon
kQ3GeometryTypePolyhedron
kQ3GeometryTypePolyLine
kQ3GeometryTypeTorus
kQ3GeometryTypeTriangle
kQ3GeometryTypeTriGrid
kQ3GeometryTypeTriMesh

These objects are described in detail later in this chapter, beginning on [link] . In most cases, the definitions of these objects are simple and obvious. For instance, a triangle is just a closed plane figure defined by three points, or vertices, in space. A simple polygon (object type kQ3GeometryTypePolygon ) is a closed plane figure defined by a list of vertices. Only six of these types of geometric primitives--meshes, trimeshes, trigrids, polyhedra, NURB curves, and NURB patches--need special discussion. See "Polyhedral Primitives" for a description of meshes, trimeshes, trigrids, and polyhedra. See "NURB Curves and Patches" for a description of NURB curves and patches.

You can determine a geometric object's type by calling the Q3Geometry_GetType function, described on [link] .

QuickDraw 3D geometric objects are opaque. This means that you can edit the data associated with an object only by calling accessor functions provided by QuickDraw 3D. For instance, once you've created a triangle, you can alter its shape or position only indirectly, for example by calling the functions Q3Triangle_GetVertexPosition and Q3Triangle_SetVertexPosition .

Attributes of Geometric Objects

Polyhedral Primitives

NURB Curves and Patches

Surface Parameterizations


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |